package com.dwd.user.mapper;

import com.dwd.basic.mapper.BaseMapper;
import com.dwd.org.pojo.Employee;
import com.dwd.user.pojo.LoginInfo;
import com.dwd.user.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;


/**
 * @Description: TODO
 * @Author 汶狄
 * @Date 2021/1/5 11:31
 * @Version 1.0
 */
@Repository
@Mapper
public interface LoginInfoMapper extends BaseMapper<LoginInfo> {

    LoginInfo queryByUsernameAndType(@Param(("username")) String username, @Param("type") Integer type);

    /**
     * 扩展登陆修改登陆表
     *
     * @param username
     * @param email
     * @param phone
     * @param loginInfoId
     */
    void updateLoginInfo(@Param("username") String username, @Param("email") String email, @Param("phone") String phone, @Param("loginInfoId") Long loginInfoId);

    /**
     * 根据手机存储盐值 密码  logininfo表
     * @param loginInfo
     *
     */
    void updateLoginInfoByPhone(LoginInfo loginInfo);

    /**
     * 根据手机存储盐值 密码  user表
     * @param user
     *
     */
    void updateUserByPhone(User user);
}